<!DOCTYPE HTML>
<html lang="en" >
    
    <head>
        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>Django介绍 | Python Web 框架要点</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="gitbook/style.css">
    
        
        <link rel="stylesheet" href="gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="gitbook/plugins/gitbook-plugin-search/search.css">
        
    
        
        <link rel="stylesheet" href="gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="./C01-CreateProject/index.html" />
    
    
    <link rel="prev" href="./index.html" />
    

        
    </head>
    <body>
        
        
    <div class="book"
        data-level="1"
        data-chapter-title="Django介绍"
        data-filepath="AboutDjango.md"
        data-basepath="."
        data-revision="Sat May 05 2018 07:17:09 GMT+0800 (CST)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="./index.html">
                
                        <i class="fa fa-check"></i>
                        
                        Python Web 框架要点
                    </a>
            
            
        </li>
    
        <li class="chapter active" data-level="1" data-path="AboutDjango.html">
            
                
                    <a href="./AboutDjango.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        Django介绍
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2" data-path="C01-CreateProject/index.html">
            
                
                    <a href="./C01-CreateProject/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        工程搭建
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="C01-CreateProject/EnvInstall.html">
            
                
                    <a href="./C01-CreateProject/EnvInstall.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        环境安装
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="C01-CreateProject/StartProject.html">
            
                
                    <a href="./C01-CreateProject/StartProject.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.</b>
                        
                        创建工程
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="C01-CreateProject/StartApp.html">
            
                
                    <a href="./C01-CreateProject/StartApp.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.</b>
                        
                        创建子应用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.4" data-path="C01-CreateProject/CreateView.html">
            
                
                    <a href="./C01-CreateProject/CreateView.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.</b>
                        
                        创建视图
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3" data-path="C02-SettingsStaticAndURL/index.html">
            
                
                    <a href="./C02-SettingsStaticAndURL/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.</b>
                        
                        配置、静态文件与路由
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1" data-path="C02-SettingsStaticAndURL/Settings.html">
            
                
                    <a href="./C02-SettingsStaticAndURL/Settings.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.</b>
                        
                        配置文件
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="C02-SettingsStaticAndURL/StaticFiles.html">
            
                
                    <a href="./C02-SettingsStaticAndURL/StaticFiles.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.2.</b>
                        
                        静态文件
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.3" data-path="C02-SettingsStaticAndURL/URL.html">
            
                
                    <a href="./C02-SettingsStaticAndURL/URL.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.</b>
                        
                        路由说明
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.4" data-path="C02-SettingsStaticAndURL/AppConfig.html">
            
                
                    <a href="./C02-SettingsStaticAndURL/AppConfig.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.4.</b>
                        
                        App应用配置
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4" data-path="C03-RequestAndResponse/index.html">
            
                
                    <a href="./C03-RequestAndResponse/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.</b>
                        
                        请求与响应
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.1" data-path="C03-RequestAndResponse/Request.html">
            
                
                    <a href="./C03-RequestAndResponse/Request.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.1.</b>
                        
                        请求Request
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.2" data-path="C03-RequestAndResponse/Response.html">
            
                
                    <a href="./C03-RequestAndResponse/Response.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.2.</b>
                        
                        响应Response
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.3" data-path="C03-RequestAndResponse/Cookie.html">
            
                
                    <a href="./C03-RequestAndResponse/Cookie.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.3.</b>
                        
                        Cookie
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.4" data-path="C03-RequestAndResponse/Session.html">
            
                
                    <a href="./C03-RequestAndResponse/Session.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.4.</b>
                        
                        Session
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5" data-path="C04-ClassViewAndMiddleware/index.html">
            
                
                    <a href="./C04-ClassViewAndMiddleware/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.</b>
                        
                        类视图与中间件
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.1" data-path="C04-ClassViewAndMiddleware/ClassView.html">
            
                
                    <a href="./C04-ClassViewAndMiddleware/ClassView.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.1.</b>
                        
                        类视图
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.2" data-path="C04-ClassViewAndMiddleware/Middleware.html">
            
                
                    <a href="./C04-ClassViewAndMiddleware/Middleware.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.2.</b>
                        
                        中间件
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="6" data-path="C05-Database/index.html">
            
                
                    <a href="./C05-Database/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.</b>
                        
                        数据库
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="6.1" data-path="C05-Database/Config.html">
            
                
                    <a href="./C05-Database/Config.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.1.</b>
                        
                        配置
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.2" data-path="C05-Database/Model.html">
            
                
                    <a href="./C05-Database/Model.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.2.</b>
                        
                        定义模型类
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.3" data-path="C05-Database/Tools.html">
            
                
                    <a href="./C05-Database/Tools.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.3.</b>
                        
                        演示工具使用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.4" data-path="C05-Database/CURD.html">
            
                
                    <a href="./C05-Database/CURD.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.4.</b>
                        
                        数据库操作
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.5" data-path="C05-Database/QuerySet.html">
            
                
                    <a href="./C05-Database/QuerySet.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.5.</b>
                        
                        查询集QuerySet
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.6" data-path="C05-Database/Manager.html">
            
                
                    <a href="./C05-Database/Manager.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.6.</b>
                        
                        管理器Manager
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="7" data-path="C06-Template/index.html">
            
                
                    <a href="./C06-Template/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.</b>
                        
                        模板
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="7.1" data-path="C06-Template/template.html">
            
                
                    <a href="./C06-Template/template.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.1.</b>
                        
                        模板使用
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="8" data-path="C07-Form/index.html">
            
                
                    <a href="./C07-Form/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.</b>
                        
                        表单
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="8.1" data-path="C07-Form/form.html">
            
                
                    <a href="./C07-Form/form.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.1.</b>
                        
                        表单使用
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="9" data-path="C08-Admin/index.html">
            
                
                    <a href="./C08-Admin/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>9.</b>
                        
                        Admin站点
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="9.1" data-path="C08-Admin/Config.html">
            
                
                    <a href="./C08-Admin/Config.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>9.1.</b>
                        
                        使用Admin站点
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="9.2" data-path="C08-Admin/ModifyListDisplay.html">
            
                
                    <a href="./C08-Admin/ModifyListDisplay.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>9.2.</b>
                        
                        调整列表页展示
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="9.3" data-path="C08-Admin/ModifyEditDisplay.html">
            
                
                    <a href="./C08-Admin/ModifyEditDisplay.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>9.3.</b>
                        
                        调整编辑页展示
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="9.4" data-path="C08-Admin/ModifySite.html">
            
                
                    <a href="./C08-Admin/ModifySite.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>9.4.</b>
                        
                        调整站点信息
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="9.5" data-path="C08-Admin/UploadImage.html">
            
                
                    <a href="./C08-Admin/UploadImage.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>9.5.</b>
                        
                        上传图片
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="./" >Python Web 框架要点</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h1 id="django&#x4ECB;&#x7ECD;">Django&#x4ECB;&#x7ECD;</h1>
<p><img src="images/django_logo.png" alt="django_logo"></p>
<h2 id="1-&#x7B80;&#x4ECB;">1. &#x7B80;&#x4ECB;</h2>
<p>Django&#xFF0C;<strong>&#x53D1;&#x97F3;&#x4E3A;[`d&#x292;&#xE6;&#x14B;&#x261;&#x259;&#x28A;]</strong>&#xFF0C;&#x662F;&#x7528;python&#x8BED;&#x8A00;&#x5199;&#x7684;&#x5F00;&#x6E90;web&#x5F00;&#x53D1;&#x6846;&#x67B6;&#xFF0C;&#x5E76;&#x9075;&#x5FAA;MVC&#x8BBE;&#x8BA1;&#x3002;&#x52B3;&#x4F26;&#x65AF;&#x51FA;&#x7248;&#x96C6;&#x56E2;&#x4E3A;&#x4E86;&#x5F00;&#x53D1;&#x4EE5;&#x65B0;&#x95FB;&#x5185;&#x5BB9;&#x4E3A;&#x4E3B;&#x7684;&#x7F51;&#x7AD9;&#xFF0C;&#x800C;&#x5F00;&#x53D1;&#x51FA;&#x6765;&#x4E86;&#x8FD9;&#x4E2A;&#x6846;&#x67B6;&#xFF0C;&#x4E8E;2005&#x5E74;7&#x6708;&#x5728;BSD&#x8BB8;&#x53EF;&#x8BC1;&#x4E0B;&#x53D1;&#x5E03;&#x3002;&#x8FD9;&#x4E2A;&#x540D;&#x79F0;&#x6765;&#x6E90;&#x4E8E;&#x6BD4;&#x5229;&#x65F6;&#x7684;&#x7235;&#x58EB;&#x97F3;&#x4E50;&#x5BB6;DjangoReinhardt&#xFF0C;&#x4ED6;&#x662F;&#x4E00;&#x4E2A;&#x5409;&#x666E;&#x8D5B;&#x4EBA;&#xFF0C;&#x4E3B;&#x8981;&#x4EE5;&#x6F14;&#x594F;&#x5409;&#x5B83;&#x4E3A;&#x4E3B;&#xFF0C;&#x8FD8;&#x6F14;&#x594F;&#x8FC7;&#x5C0F;&#x63D0;&#x7434;&#x7B49;&#x3002;<strong>&#x7531;&#x4E8E;Django&#x5728;&#x8FD1;&#x5E74;&#x6765;&#x7684;&#x8FC5;&#x901F;&#x53D1;&#x5C55;&#xFF0C;&#x5E94;&#x7528;&#x8D8A;&#x6765;&#x8D8A;&#x5E7F;&#x6CDB;&#xFF0C;&#x88AB;&#x8457;&#x540D;IT&#x5F00;&#x53D1;&#x6742;&#x5FD7;SDTimes&#x8BC4;&#x9009;&#x4E3A;2013SDTimes100&#xFF0C;&#x4F4D;&#x5217;&quot;API&#x3001;&#x5E93;&#x548C;&#x6846;&#x67B6;&quot;&#x5206;&#x7C7B;&#x7B2C;6&#x4F4D;&#xFF0C;&#x88AB;&#x8BA4;&#x4E3A;&#x662F;&#x8BE5;&#x9886;&#x57DF;&#x7684;&#x4F7C;&#x4F7C;&#x8005;&#x3002;</strong></p>
<p><img src="images/django_belief.png" alt="django&#x4FE1;&#x5FF5;"></p>
<p>Django&#x7684;<strong>&#x4E3B;&#x8981;&#x76EE;&#x7684;&#x662F;&#x7B80;&#x4FBF;&#x3001;&#x5FEB;&#x901F;&#x7684;&#x5F00;&#x53D1;&#x6570;&#x636E;&#x5E93;&#x9A71;&#x52A8;&#x7684;&#x7F51;&#x7AD9;&#x3002;</strong>&#x5B83;&#x5F3A;&#x8C03;&#x4EE3;&#x7801;&#x590D;&#x7528;&#xFF0C;&#x591A;&#x4E2A;&#x7EC4;&#x4EF6;&#x53EF;&#x4EE5;&#x5F88;&#x65B9;&#x4FBF;&#x7684;&#x4EE5;&quot;&#x63D2;&#x4EF6;&quot;&#x5F62;&#x5F0F;&#x670D;&#x52A1;&#x4E8E;&#x6574;&#x4E2A;&#x6846;&#x67B6;&#xFF0C;Django&#x6709;&#x8BB8;&#x591A;&#x529F;&#x80FD;&#x5F3A;&#x5927;&#x7684;&#x7B2C;&#x4E09;&#x65B9;&#x63D2;&#x4EF6;&#xFF0C;&#x4F60;&#x751A;&#x81F3;&#x53EF;&#x4EE5;&#x5F88;&#x65B9;&#x4FBF;&#x7684;&#x5F00;&#x53D1;&#x51FA;&#x81EA;&#x5DF1;&#x7684;&#x5DE5;&#x5177;&#x5305;&#x3002;&#x8FD9;&#x4F7F;&#x5F97;Django&#x5177;&#x6709;&#x5F88;&#x5F3A;&#x7684;&#x53EF;&#x6269;&#x5C55;&#x6027;&#x3002;&#x5B83;&#x8FD8;&#x5F3A;&#x8C03;&#x5FEB;&#x901F;&#x5F00;&#x53D1;&#x548C;DRY(DoNotRepeatYourself)&#x539F;&#x5219;&#x3002;</p>
<h2 id="2-&#x7279;&#x70B9;">2. &#x7279;&#x70B9;</h2>
<h3 id="1&#xFF09;-&#x91CD;&#x91CF;&#x7EA7;&#x6846;&#x67B6;">1&#xFF09; &#x91CD;&#x91CF;&#x7EA7;&#x6846;&#x67B6;</h3>
<p>&#x5BF9;&#x6BD4;Flask&#x6846;&#x67B6;&#xFF0C;Django&#x539F;&#x751F;&#x63D0;&#x4F9B;&#x4E86;&#x4F17;&#x591A;&#x7684;&#x529F;&#x80FD;&#x7EC4;&#x4EF6;&#xFF0C;&#x8BA9;&#x5F00;&#x53D1;&#x66F4;&#x7B80;&#x4FBF;&#x5FEB;&#x901F;&#x3002;</p>
<ul>
<li>&#x63D0;&#x4F9B;&#x9879;&#x76EE;&#x5DE5;&#x7A0B;&#x7BA1;&#x7406;&#x7684;&#x81EA;&#x52A8;&#x5316;&#x811A;&#x672C;&#x5DE5;&#x5177;</li>
</ul>
<ul>
<li>&#x6570;&#x636E;&#x5E93;ORM&#x652F;&#x6301;&#xFF08;&#x5BF9;&#x8C61;&#x5173;&#x7CFB;&#x6620;&#x5C04;&#xFF0C;&#x82F1;&#x8BED;&#xFF1A;Object Relational Mapping&#xFF09;</li>
<li>&#x6A21;&#x677F;</li>
<li>&#x8868;&#x5355;</li>
<li>Admin&#x7BA1;&#x7406;&#x7AD9;&#x70B9;</li>
<li>&#x6587;&#x4EF6;&#x7BA1;&#x7406;</li>
<li>&#x8BA4;&#x8BC1;&#x6743;&#x9650;</li>
<li>session&#x673A;&#x5236;</li>
<li>&#x7F13;&#x5B58;</li>
</ul>
<h3 id="2&#xFF09;mvt&#x6A21;&#x5F0F;">2&#xFF09;MVT&#x6A21;&#x5F0F;</h3>
<p>&#x6709;&#x4E00;&#x79CD;&#x7A0B;&#x5E8F;&#x8BBE;&#x8BA1;&#x6A21;&#x5F0F;&#x53EB;<strong>MVC</strong>&#xFF0C;&#x5176;&#x6838;&#x5FC3;&#x601D;&#x60F3;&#x662F;<strong>&#x5206;&#x5DE5;&#x3001;&#x89E3;&#x8026;&#xFF0C;&#x8BA9;&#x4E0D;&#x540C;&#x7684;&#x4EE3;&#x7801;&#x5757;&#x4E4B;&#x95F4;&#x964D;&#x4F4E;&#x8026;&#x5408;&#xFF0C;&#x589E;&#x5F3A;&#x4EE3;&#x7801;&#x7684;&#x53EF;&#x6269;&#x5C55;&#x6027;&#x548C;&#x53EF;&#x79FB;&#x690D;&#x6027;&#xFF0C;&#x5B9E;&#x73B0;&#x5411;&#x540E;&#x517C;&#x5BB9;</strong>&#x3002;</p>
<blockquote>
<p>MVC&#x7684;&#x5168;&#x62FC;&#x4E3A;<strong>Model-View-Controller</strong>&#xFF0C;&#x6700;&#x65E9;&#x7531;TrygveReenskaug&#x5728;1978&#x5E74;&#x63D0;&#x51FA;&#xFF0C;&#x662F;&#x65BD;&#x4E50;&#x5E15;&#x7F57;&#x5965;&#x591A;&#x7814;&#x7A76;&#x4E2D;&#x5FC3;(Xerox PARC)&#x5728;20&#x4E16;&#x7EAA;80&#x5E74;&#x4EE3;&#x4E3A;&#x7A0B;&#x5E8F;&#x8BED;&#x8A00;Smalltalk&#x53D1;&#x660E;&#x7684;&#x4E00;&#x79CD;&#x8F6F;&#x4EF6;&#x8BBE;&#x8BA1;&#x6A21;&#x5F0F;&#xFF0C;&#x662F;&#x4E3A;&#x4E86;&#x5C06;&#x4F20;&#x7EDF;&#x7684;&#x8F93;&#x5165;&#xFF08;input&#xFF09;&#x3001;&#x5904;&#x7406;&#xFF08;processing&#xFF09;&#x3001;&#x8F93;&#x51FA;&#xFF08;output&#xFF09;&#x4EFB;&#x52A1;&#x8FD0;&#x7528;&#x5230;&#x56FE;&#x5F62;&#x5316;&#x7528;&#x6237;&#x4EA4;&#x4E92;&#x6A21;&#x578B;&#x4E2D;&#x800C;&#x8BBE;&#x8BA1;&#x7684;&#x3002;&#x968F;&#x7740;&#x6807;&#x51C6;&#x8F93;&#x5165;&#x8F93;&#x51FA;&#x8BBE;&#x5907;&#x7684;&#x51FA;&#x73B0;&#xFF0C;&#x5F00;&#x53D1;&#x4EBA;&#x5458;&#x53EA;&#x9700;&#x8981;&#x5C06;&#x7CBE;&#x529B;&#x96C6;&#x4E2D;&#x5728;&#x4E1A;&#x52A1;&#x903B;&#x8F91;&#x7684;&#x5206;&#x6790;&#x4E0E;&#x5B9E;&#x73B0;&#x4E0A;&#x3002;&#x540E;&#x6765;&#x88AB;&#x63A8;&#x8350;&#x4E3A;Oracle&#x65D7;&#x4E0B;Sun&#x516C;&#x53F8;Java EE&#x5E73;&#x53F0;&#x7684;&#x8BBE;&#x8BA1;&#x6A21;&#x5F0F;&#xFF0C;&#x5E76;&#x4E14;&#x53D7;&#x5230;&#x8D8A;&#x6765;&#x8D8A;&#x591A;&#x7684;&#x4F7F;&#x7528;ColdFusion&#x548C;PHP&#x7684;&#x5F00;&#x53D1;&#x8005;&#x7684;&#x6B22;&#x8FCE;&#x3002;&#x73B0;&#x5728;&#x867D;&#x7136;&#x4E0D;&#x518D;&#x4F7F;&#x7528;&#x539F;&#x6765;&#x7684;&#x5206;&#x5DE5;&#x65B9;&#x5F0F;&#xFF0C;&#x4F46;&#x662F;&#x8FD9;&#x79CD;&#x5206;&#x5DE5;&#x7684;&#x601D;&#x60F3;&#x88AB;&#x6CBF;&#x7528;&#x4E0B;&#x6765;&#xFF0C;&#x5E7F;&#x6CDB;&#x5E94;&#x7528;&#x4E8E;&#x8F6F;&#x4EF6;&#x5DE5;&#x7A0B;&#x4E2D;&#xFF0C;&#x662F;&#x4E00;&#x79CD;&#x5178;&#x578B;&#x5E76;&#x4E14;&#x5E94;&#x7528;&#x5E7F;&#x6CDB;&#x7684;&#x8F6F;&#x4EF6;&#x67B6;&#x6784;&#x6A21;&#x5F0F;&#x3002;&#x540E;&#x6765;&#xFF0C;MVC&#x7684;&#x601D;&#x60F3;&#x88AB;&#x5E94;&#x7528;&#x5728;&#x4E86;&#xFF37;eb&#x5F00;&#x53D1;&#x65B9;&#x9762;&#xFF0C;&#x88AB;&#x79F0;&#x4E3A;&#xFF37;eb MVC&#x6846;&#x67B6;&#x3002;</p>
</blockquote>
<h4 id="mvc&#x6A21;&#x5F0F;&#x8BF4;&#x660E;">MVC&#x6A21;&#x5F0F;&#x8BF4;&#x660E;</h4>
<p><img src="images/mvc.png" alt="mvc"></p>
<ul>
<li>M&#x5168;&#x62FC;&#x4E3A;Model&#xFF0C;&#x4E3B;&#x8981;&#x5C01;&#x88C5;&#x5BF9;&#x6570;&#x636E;&#x5E93;&#x5C42;&#x7684;&#x8BBF;&#x95EE;&#xFF0C;&#x5BF9;&#x6570;&#x636E;&#x5E93;&#x4E2D;&#x7684;&#x6570;&#x636E;&#x8FDB;&#x884C;&#x589E;&#x3001;&#x5220;&#x3001;&#x6539;&#x3001;&#x67E5;&#x64CD;&#x4F5C;&#x3002;</li>
<li>V&#x5168;&#x62FC;&#x4E3A;View&#xFF0C;&#x7528;&#x4E8E;&#x5C01;&#x88C5;&#x7ED3;&#x679C;&#xFF0C;&#x751F;&#x6210;&#x9875;&#x9762;&#x5C55;&#x793A;&#x7684;html&#x5185;&#x5BB9;&#x3002;</li>
<li>C&#x5168;&#x62FC;&#x4E3A;Controller&#xFF0C;&#x7528;&#x4E8E;&#x63A5;&#x6536;&#x8BF7;&#x6C42;&#xFF0C;&#x5904;&#x7406;&#x4E1A;&#x52A1;&#x903B;&#x8F91;&#xFF0C;&#x4E0E;Model&#x548C;View&#x4EA4;&#x4E92;&#xFF0C;&#x8FD4;&#x56DE;&#x7ED3;&#x679C;&#x3002;</li>
</ul>
<h4 id="django&#x7684;mvt">Django&#x7684;MVT</h4>
<p><img src="images/mvt.png" alt="mvt"></p>
<ul>
<li>M&#x5168;&#x62FC;&#x4E3A;Model&#xFF0C;&#x4E0E;MVC&#x4E2D;&#x7684;M&#x529F;&#x80FD;&#x76F8;&#x540C;&#xFF0C;&#x8D1F;&#x8D23;&#x548C;&#x6570;&#x636E;&#x5E93;&#x4EA4;&#x4E92;&#xFF0C;&#x8FDB;&#x884C;&#x6570;&#x636E;&#x5904;&#x7406;&#x3002;</li>
<li>V&#x5168;&#x62FC;&#x4E3A;View&#xFF0C;&#x4E0E;MVC&#x4E2D;&#x7684;C&#x529F;&#x80FD;&#x76F8;&#x540C;&#xFF0C;&#x63A5;&#x6536;&#x8BF7;&#x6C42;&#xFF0C;&#x8FDB;&#x884C;&#x4E1A;&#x52A1;&#x5904;&#x7406;&#xFF0C;&#x8FD4;&#x56DE;&#x5E94;&#x7B54;&#x3002;</li>
<li>T&#x5168;&#x62FC;&#x4E3A;Template&#xFF0C;&#x4E0E;MVC&#x4E2D;&#x7684;V&#x529F;&#x80FD;&#x76F8;&#x540C;&#xFF0C;&#x8D1F;&#x8D23;&#x5C01;&#x88C5;&#x6784;&#x9020;&#x8981;&#x8FD4;&#x56DE;&#x7684;html&#x3002;</li>
</ul>
<p><strong>&#x6CE8;&#xFF1A;&#x5DEE;&#x5F02;&#x5C31;&#x5728;&#x4E8E;&#x9ED1;&#x7EBF;&#x9ED1;&#x7BAD;&#x5934;&#x6807;&#x8BC6;&#x51FA;&#x6765;&#x7684;&#x90E8;&#x5206; </strong></p>
<h2 id="3-django&#x5B66;&#x4E60;&#x8D44;&#x6599;">3. Django&#x5B66;&#x4E60;&#x8D44;&#x6599;</h2>
<ul>
<li><a href="https://www.djangoproject.com/" target="_blank">&#x5B98;&#x65B9;&#x7F51;&#x7AD9;</a></li>
<li><a href="https://github.com/django/django" target="_blank">Github&#x6E90;&#x7801;</a></li>
<li><a href="https://docs.djangoproject.com/en/1.11/" target="_blank">1.11&#x7248;&#x82F1;&#x6587;&#x6587;&#x6863;</a></li>
<li><a href="https://yiyibooks.cn/xx/Django_1.11.6/index.html" target="_blank">1.11&#x7248;&#x4E2D;&#x6587;&#x6587;&#x6863;</a></li>
<li><a href="http://djangobook.com/" target="_blank">Django Book &#x6559;&#x7A0B;</a></li>
<li><a href="http://www.tangowithdjango.com/book17/" target="_blank">Tange With Django &#x6559;&#x7A0B;</a></li>
</ul>

                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="./index.html" class="navigation navigation-prev " aria-label="Previous page: Python Web 框架要点"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="./C01-CreateProject/index.html" class="navigation navigation-next " aria-label="Next page: 工程搭建"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="gitbook/app.js"></script>

    
    <script src="gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
    

    
    <script src="gitbook/plugins/gitbook-plugin-search/search.js"></script>
    

    
    <script src="gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2}};
    gitbook.start(config);
});
</script>

        
    </body>
    
</html>
